| ![]() |
By default ASP.NET buffers content on server side before sending output. To eliminate keeping entire file content in memory before sending, turn off buffering setting BufferOutput property to false:
HttpContext.Current.Response.BufferOutput = false;To prevent canceling script execution when downloading a large file from IIS/ASP.NET server extend the script timeout value:
HttpContext.Current.Server.ScriptTimeout = 2400; // timeout in seconds.The WebDAV engine provides the means for downloading only a part of a file. The client application could send Range header to specify range of bytes to download. Download managers may use this feature to resume downloads or download single file using several threads at a time.